 

import { axios } from '@/service/service'
import type { RuleListReq, ResultListReq } from './types'

export function queryRuleListPaging(params: RuleListReq): any {
  return axios({
    url: '/data-quality/rule/page',
    method: 'get',
    params
  })
}

export function queryExecuteResultListPaging(params: ResultListReq): any {
  return axios({
    url: '/data-quality/result/page',
    method: 'get',
    params
  })
}

export function queryRuleList(): any {
  return axios({
    url: '/data-quality/ruleList',
    method: 'get'
  })
}

export function getRuleFormCreateJson(ruleId: number): any {
  return axios({
    url: '/data-quality/getRuleFormCreateJson',
    method: 'get',
    params: {
      ruleId
    }
  })
}

export function getDatasourceOptionsById(datasourceId: number): any {
  return axios({
    url: '/data-quality/getDatasourceOptionsById',
    method: 'get',
    params: {
      datasourceId
    }
  })
}
